package com.meatball.authorization.repository

import com.meatball.authorization.data.entity.RefreshTokenEntity
import org.springframework.data.repository.CrudRepository

interface RefreshTokenRepository : CrudRepository<RefreshTokenEntity, Long> {
    /**
     * TODO 根据刷新token查询信息
     *
     * @param refreshToken
     */
    fun findByRefreshToken(refreshToken: String) : RefreshTokenEntity

    /**
     * TODO
     *
     * @param userId
     */
    fun findByUser_Id(userId: Long) : RefreshTokenEntity?
}